// pages/myStudy/myStudy.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    days:"",
    reciteList:[],
    testList:[],
    realList:[]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  toView(){
    wx.navigateTo({
      url: '../testView/testView?totalScore=' + this.data.testList[0].score + '&wrongList=' + this.data.testList[0].wrongList + '&chooseValue=' + this.data.testList[0].chooseValue + '&testId=' + this.data.testList[0].testId
    })
  },
  onLoad: function (options) {

  },
  onReady: function () {

  },
  onShow: function () {
    let that=this
    wx.cloud.database().collection("userList").where({openid:wx.getStorageSync('openid')}).get({
      success(res){
        that.setData({
          reciteList:res.data[0].recite,
          days:res.data[0].days,
          testList:res.data[0].test
        })
        console.log(that.data.testList)
      }
    })
  },
  onHide: function () {

  },
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})